import {RequestServer} from "./RequestServer.js";
import {CONFIRMGAMEORDER} from "./ConstUrl.js";

export class ConfirmGameOrder extends RequestServer {
    constructor(game_id, game_auth_code, open_id, order_no, zone_id = 1) {
        super(game_id, game_auth_code)
        this.game_id = game_id;
        this.open_id = open_id;
        this.zone_id = zone_id;
        this.order_no = order_no;
    }

    confirmGameOrder(successCallback = super.requestServer, failCallback = super.requestServer) {
        const params = {
            game_id: this.game_id,
            open_id: this.open_id,
            order_no: this.order_no,
            zone_id: this.zone_id
        };
        super.requestServer(successCallback, failCallback, CONFIRMGAMEORDER, params);
    }
}